package com.itheima.多线程.练习;

public class Demo5 {
    public static void main(String[] args) {
        My m1 = new My();
        m1.setName("守护线程一");
        m1.setPriority(1);
        My m2 = new My();
        m2.setName("守护线程二");
        My m3 = new My();
        m3.setName("守护线程三");
        m3.setPriority(10);
        m1.start();
        m2.start();
        m3.start();
        for (int i = 0; i < 100; i++) {
            System.out.println("hello world...." + i);
        }
    }
}


class My extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(getName() + ".........." + i);
        }
    }
}